public class demo2 {
    public static void main(String[] args) {
        //1.首先定义一个数字
        int number = 19980903;
        //定义一个临时number
        int temp = number;
        //2.数字统计
        int count = 0;
        while (number!= 0){
            number /= 10;
            count++;
        }
        System.out.println(count);
        //3.定义一个动态数组
        int[] arry = new int[count];
        //定义一个下标
        int index = arry.length - 1;
        while (temp != 0 ){
            int a = temp % 10;
            temp = temp / 10;
            arry[index] = a;
            index --;
        }
        for (int i = 0; i < arry.length; i++) {
            System.out.print(arry[i] + " ");
        }
    }
}
